package com.flow.engine.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.flow.engine.enums.standard.FlowAuditType;
import com.flow.engine.enums.standard.ApprovalState;
import lombok.*;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.time.LocalDateTime;
import java.util.List;

/**
 * @author ly163
 */
@Data
@ToString
@TableName("flow_node")
@Accessors(chain = true)
public class FlowNode  implements Serializable {

    @TableId(type = IdType.AUTO)
    private Long id;

    private Long flowId;

    private String flowNodeName;

    @TableField(exist = false)
    private List<Long> parentIds;

    @TableField(exist = false)
    private List<Long> nextIds;

    private FlowAuditType flowAuditType;

    private String flowAuditValue;

    private ApprovalState approvalState;

    private String nextCondition;
    private String currentCondition;

    private String remark;

    private String createId;
    private LocalDateTime createTime;
    private String createName;

    private String updateId;
    private LocalDateTime updateTime;
    private String updateName;

    public FlowNode() {
    }

    public FlowNode(Long id, Long flowId, String flowNodeName, FlowAuditType flowAuditType, String flowAuditValue, ApprovalState approvalState, String nextCondition, String currentCondition, String remark, String createId, LocalDateTime createTime, String createName, String updateId, LocalDateTime updateTime, String updateName) {
        this.id = id;
        this.flowId = flowId;
        this.flowNodeName = flowNodeName;
        this.flowAuditType = flowAuditType;
        this.flowAuditValue = flowAuditValue;
        this.approvalState = approvalState;
        this.nextCondition = nextCondition;
        this.currentCondition = currentCondition;
        this.remark = remark;
        this.createId = createId;
        this.createTime = createTime;
        this.createName = createName;
        this.updateId = updateId;
        this.updateTime = updateTime;
        this.updateName = updateName;
    }
}
